cmake_minimum_required(VERSION 2.6)
project(stitcher)

set(CMAKE_MODULE_PATH ${stitcher_SOURCE_DIR})

set(Boost_USE_MULTITHREADED OFF)

SET(CMAKE_BUILD_TYPE debug)
SET(CMAKE_CXX_FLAGS_DEBUG "-g -D DEBUG")
SET(CMAKE_C_FLAGS_DISTRIBUTION "-g -D DEBUG")

find_package(Boost 1.36.0 REQUIRED filesystem system thread program_options)
find_package(OpenCV REQUIRED cv cxcore highgui)
find_package(GraphicsMagick REQUIRED GraphicsMagick GraphicsMagick++)

include_directories(
    ${OpenCV_INCLUDE_DIRS}
    ${Boost_INCLUDE_DIRS}
    ${GraphicsMagick_INCLUDE_DIRS}
)

add_subdirectory(src/sift)
add_subdirectory(src/tests)

set(source src/stitcher.cpp src/imagefeature.cpp src/inputimage.cpp src/featurematcher.cpp src/imagematch.cpp src/imagematcher.cpp src/featureextractor.cpp src/globalhomographycalculator.cpp src/imageloader.cpp src/outputrenderer.cpp src/commandlineoptions.cpp src/enblendrenderer src/opencvrenderer.cpp src/imageset.cpp src/componentfinder.cpp)

add_executable(stitcher ${source})
target_link_libraries(stitcher
    ${OpenCV_LIBRARIES}
    ${Boost_LIBRARIES}
    ${GraphicsMagick_LIBRARIES}
    sift
)
